#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
#ifdef __cplusplus
extern "C" {
#endif
btTriangleIndexVertexArray* bullet_NewbtTriangleIndexVertexArray(){
	btTriangleIndexVertexArray* wrap_out = new btTriangleIndexVertexArray();
	return wrap_out;
}

btTriangleIndexVertexArray* bullet_NewbtTriangleIndexVertexArray1(int numTriangles,int* triangleIndexBase,int triangleIndexStride,int numVertices,double* vertexBase,int vertexStride){
	int c_arg_numTriangles=numTriangles;
	int * c_arg_triangleIndexBase=(int *)(void*)(triangleIndexBase);
	int c_arg_triangleIndexStride=triangleIndexStride;
	int c_arg_numVertices=numVertices;
	btScalar * c_arg_vertexBase=(btScalar *)(void*)(vertexBase);
	int c_arg_vertexStride=vertexStride;
	btTriangleIndexVertexArray* wrap_out = new btTriangleIndexVertexArray(c_arg_numTriangles,c_arg_triangleIndexBase,c_arg_triangleIndexStride,c_arg_numVertices,c_arg_vertexBase,c_arg_vertexStride);
	return wrap_out;
}

void bullet_btTriangleIndexVertexArray_addIndexedMesh(btTriangleIndexVertexArray* c_this,btIndexedMesh* mesh,PHY_ScalarType indexType){
	btIndexedMesh const& c_arg_mesh=(btIndexedMesh const&)(*mesh);
	PHY_ScalarType c_arg_indexType=indexType;
	c_this->addIndexedMesh(c_arg_mesh,c_arg_indexType);
}

btIndexedMesh* bullet_NewbtIndexedMesh(){
	btIndexedMesh* wrap_out = new btIndexedMesh();
	return wrap_out;
}

PHY_ScalarType bullet_btIndexedMesh_GetFieldOfM_indexType(btIndexedMesh* c_this){
	return (PHY_ScalarType)(c_this->m_indexType);
}

int bullet_btIndexedMesh_GetFieldOfM_numTriangles(btIndexedMesh* c_this){
	return (int)(c_this->m_numTriangles);
}

int bullet_btIndexedMesh_GetFieldOfM_numVertices(btIndexedMesh* c_this){
	return (int)(c_this->m_numVertices);
}

unsigned char** bullet_btIndexedMesh_GetFieldOfM_triangleIndexBase(btIndexedMesh* c_this){
	return (unsigned char**)(&c_this->m_triangleIndexBase);
}

int bullet_btIndexedMesh_GetFieldOfM_triangleIndexStride(btIndexedMesh* c_this){
	return (int)(c_this->m_triangleIndexStride);
}

unsigned char** bullet_btIndexedMesh_GetFieldOfM_vertexBase(btIndexedMesh* c_this){
	return (unsigned char**)(&c_this->m_vertexBase);
}

int bullet_btIndexedMesh_GetFieldOfM_vertexStride(btIndexedMesh* c_this){
	return (int)(c_this->m_vertexStride);
}

PHY_ScalarType bullet_btIndexedMesh_GetFieldOfM_vertexType(btIndexedMesh* c_this){
	return (PHY_ScalarType)(c_this->m_vertexType);
}

#ifdef __cplusplus
}
#endif
